<?php
$id = $this->id ? $this->id : 'specialList';
$list = $this->list ? $this->list : array();
$isRow = $this->row ? $this->row : false;
$num = $this->num ? $this->num : 5;
?>
<ul class="specialList" id="<?php echo $id;?>">
	<?php
	$key = 0;
	foreach($list AS $row) {
		if($isRow) {
			$cover = $row->getCover()->getThumb(false);
			$special = $row->toArray();
			$url = $this->url('special/index', array('name' => $special['name']));
		} else {
			$cover =$row['_cover']['thumb'];
			$special = $row;
			$url = $row['_url'];
		}
		if($key > 0 && $key % $num == 0) {
			echo '<div class="clear"></div>';
		}
		$key++;
	?>
	<li>
		<div class="specialMinBox o8" onmouseover="this.className='specialMinBox';" onmouseout="this.className='specialMinBox o8';">
			<div class="img">
				<a href="<?php echo $url;?>">
				<img src="<?php echo $cover;?>" alt="<?php echo $this->escape($special['title']);?>" />
				<em class="o6"><strong><?php echo $special['ptotal']?></strong> photo(s)</em>
				</a>
			</div>
			<div class="title">
				<a href="<?php echo $this->url('special/index', array('name' => $special['name']));?>" target="_blank">
				<?php echo $this->escape($special['title']);?>
				</a>
			</div>
		</div>
	</li>
	<?php } ?>
</ul>